package com.mmall.concurrency.example.singleton;

import com.mmall.concurrency.annotions.ThreadSafes;

/**
 * 饿汉模式
 *  单例实例在类装载时进行创建
 *
 * @author Diamon.Cheng
 * @date 2019/12/5.
 */
@ThreadSafes
public class SingletonExample_2 {

    private  SingletonExample_2(){
    
    }
    
    public  static SingletonExample_2  instance = new SingletonExample_2();
    
    public  static SingletonExample_2  getInstance(){
    
        return instance;
    }

}
